<?php
$Switcher = $MT_mod_cust['Switcher'];
mst_initmod('mauth');
switch($Switcher->next())
{
	case 'p1':
		echo 'p1';
		mauth_logout();
	break;
	case 'p2':
		if (mauth_login('test@localhost','123')){echo 'ok';}
		echo 'p2';
	break;
	case 'p3':
		mauth_loginsu('test2@localhost');
		echo 'p3';
	break;
	case 'p4':
		mauth_logoutsu();
		echo 'p4';
	break;
	case 'info':
		phpinfo();
	break;
	default:
	break;
}
echo $Switcher->next().'<br />';
/*
echo $Switcher->next().'<br />';
echo $Switcher->next().'<br />';
echo $Switcher->next().'<br />';
// echo $Switcher->get(0);
// echo $Switcher->get(1);
*/
// echo $Switcher->url_branch('p1/p2');
?>
<ul>
	<li><a href="<?=$Switcher->url_branch();?>">main</a></li>
	<li><a href="<?=$Switcher->url_branch('p1');?>">p1</a></li>
	<li><a href="<?=$Switcher->url_branch('p2');?>">p2</a></li>
	<li><a href="<?=$Switcher->url_branch('p3');?>">p3</a></li>
	<li><a href="<?=$Switcher->url_branch('p4');?>">p4</a></li>
	<li><a href="<?=$Switcher->url_branch('p1/p2');?>">s-p1-p2</a></li>
	<li><a href="<?=$Switcher->url_branch('info');?>">Info</a></li>
</ul>
<br />
<?=$Switcher->url_branch('p1/p2');?>
<br />
<?php

echo '<br />';
if (mauth_auth())
{
	echo mauth_this_wholelogin();
}else
{
	echo 'no auth';
}



?>